<%#
# To change this template, choose Tools | Templates
# and open the template in the editor.
%>
<h1>产品展示</h1>
<% for product in @products %>
  <div class="catalogentry">
    <img src="<%= product.image_url %>"/>
    <h3><%= h(product.title) %></h3>
    <%= product.description %>
    <span class="catalogprice"><%= number_to_currency(product.price) %></span>
    <%= link_to '收藏',
      {:action => 'add_to_cart', :id => product },
      :class => 'addtocart' %><br/>
  </div>
  <div class="separator">&nbsp;</div>
<% end %>
<%= link_to "查看购物车", :action => "display_cart" %>

